package cn.stylefeng.guns.modular.agv.mapper;

import cn.stylefeng.guns.modular.agv.entity.HikAgvRoadWay;
import cn.stylefeng.guns.modular.agv.model.params.HikAgvRoadWayParam;
import cn.stylefeng.guns.modular.agv.model.result.HikAgvRoadWayResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 海康小车巷道情况 Mapper 接口
 * </p>
 *
 * @author zhangzh
 * @since 2024-06-06
 */
public interface HikAgvRoadWayMapper extends BaseMapper<HikAgvRoadWay> {

    /**
     * 获取列表
     *
     * @author zhangzh
     * @Date 2024-06-06
     */
    List<HikAgvRoadWayResult> customList(@Param("paramCondition") HikAgvRoadWayParam paramCondition);

    List<HikAgvRoadWayResult> getListAll();

    HikAgvRoadWayResult getDetail(@Param("paramCondition") HikAgvRoadWayParam paramCondition);

    HikAgvRoadWayResult getTrainSeqByPlatNum(@Param("plateNumber") String plateNumber);

    Integer getMaxTrainSeq();

    /**
     * 获取map列表
     *
     * @author zhangzh
     * @Date 2024-06-06
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") HikAgvRoadWayParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhangzh
     * @Date 2024-06-06
     */
    Page<HikAgvRoadWayResult> customPageList(@Param("page") Page page, @Param("paramCondition") HikAgvRoadWayParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author zhangzh
     * @Date 2024-06-06
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") HikAgvRoadWayParam paramCondition);

    /**
     * 获取当前剩余托数
     * @param roadWayCode
     * @return
     */
    Integer getFullNum(@Param("roadWayCode") String roadWayCode);

}
